<template>
  <div class="demo">
    <div class="item1">
      <h2>默认插槽</h2>
      <slot></slot>
      <h2>默认插槽</h2>
    </div>
    <div class="item2">
      <h2>具名插槽</h2>
      <slot name="video"></slot>
      <h2>具名插槽</h2>
    </div>
  </div>
</template>

<script setup lang="ts"></script>

<style scoped>
.demo {
  display: flex;
  align-items: center;
  justify-content: center;
}
.item1 {
  width: 200px;
  height: 200px;
  margin-right: 10px;
  text-align: center;
  background: lightgray;
}
.item2 {
  width: 200px;
  height: 200px;
  margin-right: 10px;
  text-align: center;
  background: lightgreen;
}
</style>
